//
//  Service+swift.swift
//  testApp
//
//  Created by ColdMountain on 2017/1/16.
//  Copyright © 2017年 ColdMountain. All rights reserved.
//

import Foundation

func postSwiftFuncation(IndexPage:UInt,success:@escaping(Any?)->(Void),
                        failure:@escaping(Any?)->(Void))
{
    let path = "/back/mobile/zixun/list/jqzx"
    let countPer:Int=0
    let dic = ["page":UInt(IndexPage)*UInt(countPer),"row":countPer] as [String : Any]
    [NetworkClient.postRequest(path, parameters:dic, needPrompt:true, success: { (data)->(Void) in
        success(data)
    }, failure: { (data)->(Void) in
        failure(data)
    })]
    
}

func postActivityFunction(IndexPage:UInt,success:@escaping(Any?)->(Void),
                          failure:@escaping(Any?)->(Void))
{
    let path = "/back/mobile/zixun/list/yhhd"
    let countPer:Int=0
    let dic = ["page":UInt(IndexPage)*UInt(countPer),"row":countPer] as[String:Any]
    [NetworkClient.postRequest(path, parameters:dic, needPrompt: true, success: { (data)->(Void) in
        success(data)
    }, failure: { (data)->(Void) in
        failure(data)
    })]
}

func postActivityDetails(ID:String,success:@escaping(Any?)->(Void),
                         failure:@escaping(Any?)->(Void))
{
    let path = "/back/mobile/zixun/item/"
    let id = ID
    let paths = path+id
    [NetworkClient.postRequest(paths, parameters:[:], needPrompt: true, success: { (data)->(Void) in
        success(data)
    }, failure: { (data)->(Void) in
        failure(data)
    })]
}




